//
//  PopoverViewController.swift
//  TakeTime
//
//  Created by bachelor on 16/11/12.
//  Copyright © 2016年 bachelor. All rights reserved.
//

import UIKit

private let reuseIdentifier = "Cell"

class PopoverViewController: UIViewController, UITableViewDataSource {

    
    @IBOutlet weak var tableView: UITableView!
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: reuseIdentifier)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /// 好友分组
    lazy var friendGroup: [String] = {
        return ["首页", "好友圈", "群微博", "我的微博"];
    }()
    
    // MARK: ----DataSource----
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return friendGroup.count
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath)
        
        cell.textLabel?.text = friendGroup[indexPath.row]
        
        return cell
    }
}
